package com.seednia.module.core.domain.dto;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.seednia.foundation.framework.dto.AbstractRecord;
import com.seednia.module.core.tagging.dto.ITaggable;
import com.seednia.module.core.tagging.dto.TaggingDto;

/**
 * Concrete Taggigng class
 * 
 * @author Young Suk Ahn
 *
 */
@XmlRootElement(name = "DomainTaggingDto", 
namespace = "http://seednia.com/core/1.0")
@XmlType(name = "DomainTaggingDto")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class DomainTaggingDto extends TaggingDto {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -9010696886250183319L;
	
	public static final String TAG_TYPE = "Domain";
	
	DomainTaggingDto () {}
	
	public DomainTaggingDto(ITaggable taggable)
	{
		super(taggable, TAG_TYPE);
	}
	
	/**
	 * To create object from JSONP string
	 * Used by the REST framework when sending this object as parameter
	 * @param jsonStr
	 * @return
	 */
	public static DomainTaggingDto fromString(String jsonStr) {
		DomainTaggingDto retval = (DomainTaggingDto) AbstractRecord.fromString(DomainTaggingDto.class, jsonStr);
		return retval;
	}
}
